Optimal. Leaf size=45 \[ \frac {a^2 x^2}{2}-\frac {a b \tanh ^{-1}\left (\cosh \left (c+d x^2\right )\right )}{d}-\frac {b^2 \coth \left (c+d x^2\right )}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {5545, 3858,
3855, 3852, 8} \begin {gather*} \frac {a^2 x^2}{2}-\frac {a b \tanh ^{-1}\left (\cosh \left (c+d x^2\right )\right )}{d}-\frac {b^2 \coth \left (c+d x^2\right )}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3858
Rule 5545
Rubi steps
\begin {align*} \int x \left (a+b \text {csch}\left (c+d x^2\right )\right )^2 \, dx &=\frac {1}{2} \text {Subst}\left (\int (a+b \text {csch}(c+d x))^2 \, dx,x,x^2\right )\\ &=\frac {a^2 x^2}{2}+(a b) \text {Subst}\left (\int \text {csch}(c+d x) \, dx,x,x^2\right )+\frac {1}{2} b^2 \text {Subst}\left (\int \text {csch}^2(c+d x) \, dx,x,x^2\right )\\ &=\frac {a^2 x^2}{2}-\frac {a b \tanh ^{-1}\left (\cosh \left (c+d x^2\right )\right )}{d}-\frac {\left (i b^2\right ) \text {Subst}\left (\int 1 \, dx,x,-i \coth \left (c+d x^2\right )\right )}{2 d}\\ &=\frac {a^2 x^2}{2}-\frac {a b \tanh ^{-1}\left (\cosh \left (c+d x^2\right )\right )}{d}-\frac {b^2 \coth \left (c+d x^2\right )}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 69, normalized size = 1.53 \begin {gather*} -\frac {b^2 \coth \left (\frac {1}{2} \left (c+d x^2\right )\right )-2 a \left (a c+a d x^2+2 b \log \left (\tanh \left (\frac {1}{2} \left (c+d x^2\right )\right )\right )\right )+b^2 \tanh \left (\frac {1}{2} \left (c+d x^2\right )\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.20, size = 68, normalized size = 1.51
method | result | size |
risch | \(\frac {a^{2} x^{2}}{2}-\frac {b^{2}}{d \left ({\mathrm e}^{2 d \,x^{2}+2 c}-1\right )}+\frac {a b \ln \left ({\mathrm e}^{d \,x^{2}+c}-1\right )}{d}-\frac {a b \ln \left ({\mathrm e}^{d \,x^{2}+c}+1\right )}{d}\) | \(68\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 49, normalized size = 1.09 \begin {gather*} \frac {1}{2} \, a^{2} x^{2} + \frac {a b \log \left (\tanh \left (\frac {1}{2} \, d x^{2} + \frac {1}{2} \, c\right )\right )}{d} + \frac {b^{2}}{d {\left (e^{\left (-2 \, d x^{2} - 2 \, c\right )} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 271 vs.
\(2 (41) = 82\).
time = 0.38, size = 271, normalized size = 6.02 \begin {gather*} \frac {a^{2} d x^{2} \cosh \left (d x^{2} + c\right )^{2} + 2 \, a^{2} d x^{2} \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + a^{2} d x^{2} \sinh \left (d x^{2} + c\right )^{2} - a^{2} d x^{2} - 2 \, b^{2} - 2 \, {\left (a b \cosh \left (d x^{2} + c\right )^{2} + 2 \, a b \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + a b \sinh \left (d x^{2} + c\right )^{2} - a b\right )} \log \left (\cosh \left (d x^{2} + c\right ) + \sinh \left (d x^{2} + c\right ) + 1\right ) + 2 \, {\left (a b \cosh \left (d x^{2} + c\right )^{2} + 2 \, a b \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + a b \sinh \left (d x^{2} + c\right )^{2} - a b\right )} \log \left (\cosh \left (d x^{2} + c\right ) + \sinh \left (d x^{2} + c\right ) - 1\right )}{2 \, {\left (d \cosh \left (d x^{2} + c\right )^{2} + 2 \, d \cosh \left (d x^{2} + c\right ) \sinh \left (d x^{2} + c\right ) + d \sinh \left (d x^{2} + c\right )^{2} - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \left (a + b \operatorname {csch}{\left (c + d x^{2} \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 75, normalized size = 1.67 \begin {gather*} \frac {{\left (d x^{2} + c\right )} a^{2}}{2 \, d} - \frac {a b \log \left (e^{\left (d x^{2} + c\right )} + 1\right )}{d} + \frac {a b \log \left ({\left | e^{\left (d x^{2} + c\right )} - 1 \right |}\right )}{d} - \frac {b^{2}}{d {\left (e^{\left (2 \, d x^{2} + 2 \, c\right )} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.62, size = 81, normalized size = 1.80 \begin {gather*} \frac {a^2\,x^2}{2}-\frac {b^2}{d\,\left ({\mathrm {e}}^{2\,d\,x^2+2\,c}-1\right )}-\frac {2\,\mathrm {atan}\left (\frac {a\,b\,{\mathrm {e}}^{d\,x^2}\,{\mathrm {e}}^c\,\sqrt {-d^2}}{d\,\sqrt {a^2\,b^2}}\right )\,\sqrt {a^2\,b^2}}{\sqrt {-d^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________